// window manager header

#ifndef WINMAN_H
#define WINMAN_H

// callback types
typedef bool (*MessageCallback)( uint_t win, uint_t msg, uint_t param1, uint_t param2 );

// message types
typedef struct {
	uint_t msg;
	uint_t param;
} MSG;

// rectangle type
typedef struct {
	uint_t x1,y1,x2,y2;
} RECT;

// window messages
#define WM_PAINT		0
#define WM_MOUSEDOWN	1
#define WM_MOUSEUP		2
#define WM_MOUSEMOVE	3

// initializes the window manager
void InitWinMan();

// default callback
bool DefCallback( uint_t win, uint_t msg, uint_t param1, uint_t param2 );

// handles a repaint
void winman_Repaint();

// handles a mousedown event
void winman_MouseDown( uint_t but, uint_t mx, uint_t my );

// checks to see if a window is under the specific co-ordinates
bool winman_IsWindow( uint_t x, uint_t y );

// puts a message box on the screen
void MessageBox( uint_t win, const char* txt, const char* title, uint_t x, uint_t y );

// creates a new window - a lot of this is just so I'm ready
uint_t CreateWindow( uint_t flags, const char* title, uint_t x, uint_t y, uint_t w, uint_t h, MessageCallback cb );

#endif
